#ifndef PREVIEWDIRECTIONSELECTOR_H
#define PREVIEWDIRECTIONSELECTOR_H

#include <QWidget>
#include <QVector3D>

#include "stlmodelwidget.h"

namespace Ui {
class PreviewDirectionSelector;
}

class PreviewDirectionSelector : public QWidget
{
    Q_OBJECT

public:
    explicit PreviewDirectionSelector(std::shared_ptr<STLModelWidget> parent = nullptr);
    ~PreviewDirectionSelector();

private slots:
    void on_d1_minus_clicked();
    void on_d1_plus_clicked();
    void on_d2_minus_clicked();
    void on_d2_plus_clicked();
    void on_x_minus_clicked();
    void on_x_plus_clicked();
    void on_y_minus_clicked();
    void on_y_plus_clicked();
    void on_model_recover_clicked();
    void on_record_latest_clicked();
    void on_recover_origin_clicked();

private:
    Ui::PreviewDirectionSelector *ui;
    std::shared_ptr<STLModelWidget> m_sp_modelWidget;
    QVector3D m_original_model_pos, m_original_model_center, m_original_model_up;
    QVector3D m_latest_model_pos, m_latest_model_center, m_latest_model_up;
};

#endif // PREVIEWDIRECTIONSELECTOR_H
